package com.ibm.spatiotemp.server.datasources;

import java.util.Collection;

import org.apache.log4j.Logger;

import com.ibm.spatiotemp.server.datamodel.gpsdata.TSPoint;
import com.ibm.spatiotemp.server.datamodel.gpsdata.TSPointResultSet;
import com.ibm.spatiotemp.server.framework.request.Request;


public abstract class RawDataAccessor {
	public static Logger logger = Logger.getLogger(RawDataAccessor.class);
	protected DataSource DataSource;
	protected QueryStringFormatter queryformatter;
	
	public RawDataAccessor(DataSource src)
	{
		this.DataSource = src;
	}

	public QueryStringFormatter getQueryStringFormatter()
	{
		return this.queryformatter;
	}
	
	/*access API declarations*/
	public abstract void connect() throws Exception;
	public abstract void close() throws Exception;
	public abstract TSPointResultSet ScanGPSData(String query_string ) throws Exception;
	public abstract TSPointResultSet ScanGPSData(Request request) throws Exception;
	public abstract int WriteGPSData(String query_string, Collection<TSPoint> tsp_data) throws Exception;
	
}
